<%--
  Created by IntelliJ IDEA.
  User: zeal
  Date: 2020/12/17
  Time: 19:04
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java"  pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">  <!-- 以上代码告诉IE浏览器，IE8/9及以后的版本都会以最高版本IE来渲染页面。 -->  
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>计算机实验室预约系统——联系管理员</title>
	<link rel="stylesheet" href="http://localhost:8080/OpenExperimentManagementSystem/css/normalize.css">
	<link rel="stylesheet" href="http://localhost:8080/OpenExperimentManagementSystem/css/common.css">
	
	
	<script src="http://libs.baidu.com/jquery/3.1.1/jquery.min.js"></script>
    <script src="../jquery/jquery-3.1.1.min.js"></script>
    <script type="text/javascript">
/*         $(function () {     //显示教室类别
            $("tr[name='exp']").each(function () {
                var r = $(this).find("td").eq(2)
                if(r.text() == "1")
                    r.text("硬件")
                if(r.text() === "2") r.text("软件")
            })
        }) */



function confirmDelete(){
    var r = confirm("是否删除");
    return r;
}
    </script>
</head>
<body style="background:url(http://localhost:8080/OpenExperimentManagementSystem/images/back6.jpg);background-size:100% 100% ; background-attachment: fixed"
  style="padding:20px;">
	<header>
		<div class="logo">
		<a href="http://cs.njust.edu.cn/">
			<img src="http://localhost:8080/OpenExperimentManagementSystem/images/cslogo.png" style="width: 80px;height: 80px;margin-left: 250px;margin-top: 20px;" >
		</a>
			<h1 class="vertical-center">开放性实验辅助管理系统</h1>
		</div>
		<div class="logoff">
			<a href="#"><span><em class="username">${uname}</em>（<em class="usernum">${uid}</em>）</span></a>
			<a href="LoginServlet?op=exit" id="logout"><img src="http://localhost:8080/OpenExperimentManagementSystem/images/out.png" alt="退出登录"></a>
		</div>
	</header><!-- header结束 -->
	<div class="container" style="margin:20px auto;">
		<nav class="nav-list">
			<a href="StudentPageServlet" class="nav-item" id="nav-item1">
				<span class="iconfont">&#xe63e;</span>
				<span class="item-info">主页</span>
			</a>
			
			<a href="AllExpServlet" class="nav-item" id="nav-item3">
				<span class="item-info">全部实验</span>
			</a>
			<a href="SelectServlet" class="nav-item" id="nav-item4">
				<span class="item-info">我的实验</span>
			</a>
			
			<a href="UserCenterServlet" class="nav-item" id="nav-item6">
				<span class="item-info">用户中心</span>
			</a>
			<a href="StudentMessageServlet" class="nav-item" id="nav-item6">
				<span class="item-info">交流平台</span>
			</a>
			<span class="triangle" style="left: 437px;"></span>
		</nav>
		<div class="content">
			
			<div class="M00" style="min-height: 400px; _height: 400px;">
			    <table width="100%"  border="0" cellspacing="1" cellpadding="0" bgcolor="#e1e1e1" class="List_T">
			        <tr>
			            <td align="center" bgcolor="#b8b8b8">
			                <strong>实验名称</strong>
			            </td>
						<td align="center" bgcolor="#b8b8b8">
						    <strong>负责人</strong>
						</td>
						<td align="center" bgcolor="#b8b8b8">
						    <strong>实验类型</strong>
						</td>
						<td align="center" bgcolor="#b8b8b8">
						    <strong>下载模板</strong>
						</td>
						<td align="center" bgcolor="#b8b8b8">
						    <strong>提交</strong>
						</td>
						<td align="center" bgcolor="#b8b8b8">
						    <strong>删除</strong>
						</td>	    
						<td align="center" bgcolor="#b8b8b8">
						    <strong>起止周次</strong>
						</td>	    
						<td align="center" bgcolor="#b8b8b8">
						    <strong>分数</strong>
						</td>	            
			        </tr>
			      <c:forEach items="${elist}" var="e">
			        <tr name="exp">
			        	<intput type="hidden" name="eid" value="${e.id}" ></intput>
			            <td align="center" bgcolor="#FFFFFF">
							${e.ex_name}
			            </td>
			            <td align="center" bgcolor="#FFFFFF">
							${e.te_name}
			            </td>
			            <td name="type" align="center" bgcolor="#FFFFFF">
			            	<c:choose>
		                    <c:when test="${e.type=='1' }">
			                	硬件
			                </c:when>
			                <c:when test="${e.type=='2' }">
			                	软件
			                </c:when>
			                </c:choose>	
			            </td>
			            <td align="center" bgcolor="#FFFFFF">
			                <a href="DownloadServlet?filename=${e.teURL}">实验模板</a>
			            </td>
			            <td align="center" bgcolor="#FFFFFF">
			                <a href="SelectServlet?op=upload&sid=${e.id}&eid=${e.ex_id}">提交</a>
			            </td>
			            <td align="center" bgcolor="#FFFFFF">
			                <a href="DelExpServlet?uid=${e.stu_number}&eid=${e.ex_id}" onclick="return confirmDelete()">删除</a>
			            </td>
			            <td align="center" bgcolor="#FFFFFF">
			                ${e.begweek}周至${e.grade}周
			            </td>
			            <td align="center" bgcolor="#FFFFFF">
			                ${e.grade}
			            </td>
			        </tr>
				</c:forEach>    
				</table>
			</div>
		
			
		</div>
		
		
		
	</div>
	
</body>
</html>
